package com.zhangtai.modules.service;

import com.zhangtai.modules.controller.admin.JobController;
import com.zhangtai.modules.jobTask.CommonJobTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.ServletContextAware;

import javax.servlet.ServletContext;

@Service
public class initService implements ServletContextAware {

    @Autowired
    private CommonJobTask commonJobTask;
    @Autowired
    private JobController jobController;

    @Override
    public void setServletContext(ServletContext servletContext) {

        //启动加载部门信息
//        commonJobTask.org();
//        民族，籍贯
//        commonJobTask.nationAndCity();
        //启动加载社保公积金信息
//        commonJobTask.security();
//        commonJobTask.salary(); //缓存薪资组  和职级
//        jobController.getBase();
//        commonJobTask.findAllsalaryGroupFromSsql(); //整体缓存薪资组


//        jobController.getMenu(); //同步所有用户菜单
//        jobController.getEmpInfoToRedis(); // 同步所有员工信息到redis



    }
}
